package org.graduates.webapp.actions.utils;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import org.graduates.webapp.actions.BaseAction;
/**
 * 得到当前用户的ID
 * @author Administrator
 *
 */
@ParentPackage("web")
public class GetCurrentPersonIdAction extends BaseAction {

	private static final long serialVersionUID = 9222801279720594282L;
	
	private long pid = 0L;
	
	@Action(results = { @Result(name = "input", type = "redirect", location = "login.action"),
			@Result(name = "success", type = "json") })
	public String execute() {
		pid = getCurrentPerson().getId();
		return SUCCESS;
	}

	public long getPid() {
		return pid;
	}

	
}
